package com.spring.nio.business.user.repository.converter;

import com.spring.nio.business.user.dto.UserDTO;
import com.spring.nio.business.user.param.UserCreateParam;
import com.spring.nio.business.user.repository.dataobject.UserDo;
import org.mapstruct.Mapper;

/**
 * @author spring
 * @date 2020/9/27
 * @description 用户转换器
 */
@Mapper(componentModel = "spring")
public interface UserDomainConverter {

    /**
     * 用户服务创建参数转DO
     * @param param
     * @return
     */
    UserDo createParamToDo(UserCreateParam param);

    /**
     * 用户服务 DO 转 DTO
     * @param userDo
     * @return
     */
    UserDTO doToDto(UserDo userDo);
}
